Decoding device and encoding device

ABSTRACT

According to an embodiment, a decoding device includes, an acquiring unit configured to acquire first format information, encoded data, and first filter information, the first format information indicating a resolution of a color-difference component of the encoded data; a decoding unit configured to decode the encoded data to obtain a decoded image; and a converting unit configured to convert a color-difference format of the decoded image represented by a first color-difference format by using a filter identified by the filter information.

CROSS-REFERENCE TO RELATED APPLICATION

This application is a continuation application of U.S. application Ser.No. 15/680,039 filed Aug. 17, 2017, which is a continuation applicationof U.S. application Ser. No. 15/445,767, filed Feb. 28, 2017, which is acontinuation application of U.S. application Ser. No. 14/028,687 (nowU.S. Pat. No. 9,621,867), filed Sep. 17, 2013, which is based upon andclaims the benefit of priority from Japanese Patent Application Nos.2012-208837, filed on Sep. 21, 2012 and 2012-270314, filed on Dec. 11,2012; the entire contents of each of which are incorporated herein byreference.

FIELD

Embodiments described herein relate generally to a decoding device andan encoding device.

BACKGROUND

Regarding an image having a luminance component and a color-differencecomponent, the image is sometimes encoded after converting a resolutionof the color-difference component. In the same manner, the image isdecoded after converting the resolution of the color-difference. Theresolution of the color-difference component has various formats such asa 4:4:4 format, a 4:2:2 format, and a 4:2:0 format.

If resolution conversion is performed repeatedly with respect to thecolor-difference component, it leads to deterioration of the image. Forthat reason, in the past, there have been attempts to suppress the imagedeterioration. More particularly, a technology has been disclosed inwhich a filter that meets the conditions for suppressing the imagedeterioration is designed as the filter to be used in performingresolution conversion with respect to the color-difference component.

However, in the past, image deterioration occurs depending on theresolution of the color-difference component of the image to be output.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a schematic diagram illustrating an encoding device accordingto a first embodiment;

FIG. 2 is a schematic diagram illustrating a converting unit in theencoding device according to the first embodiment;

FIG. 3 is a schematic diagram illustrating an encoding unit in theencoding device according to the first embodiment;

FIG. 4 is a schematic diagram illustrating a generating unit in theencoding device according to the first embodiment;

FIG. 5 is a diagram illustrating an exemplary syntax of color-differenceconversion information;

FIG. 6 is a schematic diagram illustrating an exemplary data structureof definition information;

FIG. 7 is a diagram illustrating another exemplary syntax of thecolor-difference conversion information;

FIG. 8 is a diagram illustrating still another exemplary syntax of thecolor-difference conversion information;

FIG. 9 is a diagram illustrating an example of the data structure ofcolor-difference conversion filter definition information;

FIG. 10 is a diagram of another example of the data structure of thecolor-difference conversion filter definition information;

FIG. 11 is a diagram illustrating an exemplary syntax ofcolor-difference conversion filter information;

FIG. 12 is a diagram illustrating still another exemplary syntax of thecolor-difference conversion information;

FIG. 13 is a diagram illustrating another exemplary syntax of thecolor-difference conversion filter information;

FIG. 14 is a diagram illustrating still another example of the datastructure of the color-difference conversion filter definitioninformation;

FIG. 15 is a diagram illustrating still another exemplary syntax of thecolor-difference conversion filter information;

FIG. 16 is a diagram illustrating still another example of the datastructure of the color-difference conversion filter definitioninformation;

FIG. 17 is a diagram illustrating still another exemplary syntax of thecolor-difference conversion filter information;

FIG. 18 is a flowchart of an encoding operation according to the firstembodiment;

FIG. 19 is a schematic diagram illustrating an encoding device accordingto a second embodiment;

FIG. 20 is a schematic diagram illustrating a generating unit in theencoding device according to the second embodiment;

FIG. 21 is a schematic diagram illustrating a converting unit accordingto a second modification;

FIG. 22 is a schematic diagram illustrating a generating unit accordingto the second modification;

FIG. 23 is a schematic diagram illustrating an encoding device accordingto a third modification;

FIG. 24 is a schematic diagram illustrating a decoding device accordingto a third embodiment:

FIG. 25 is a schematic diagram illustrating a decoding unit in thedecoding device according to the third embodiment;

FIG. 26 is a schematic diagram illustrating another decoding unit in thedecoding device according to the third embodiment;

FIG. 27 is, a schematic diagram illustrating a convening unit in thedecoding device according to the third embodiment;

FIG. 28 is a flowchart of a decoding operation according to the thirdembodiment;

FIG. 29 is a schematic diagram illustrating a decoding unit according toan eighth modification;

FIG. 30 is a schematic diagram illustrating a converting unit accordingto the eighth modification;

FIG. 31 is a block diagram illustrating a hardware configuration of theencoding devices and the decoding device according to the embodiments;and

FIG. 32 is a hardware configuration diagram.

DETAILED DESCRIPTION

According to an embodiment, a decoding device includes an acquiring unitconfigured to acquire first format information, encoded data, and firstfilter information, the first format information indicating a resolutionof a color-difference component of the encoded data; a decoding unitconfigured to decode the encoded data to obtain a decoded image; and aconverting unit configured to convert a color-difference format of thedecoded image represented by a first color-difference format by using afilter identified by the filter information.

Next, a hardware configuration of the device (the decoding device, andthe encoding device) according to the present embodiment will bedescribed with reference to FIG. 32. FIG. 32 is an explanatory viewillustrating a hardware configuration of the device according to each ofthe embodiments. The decoding device, and the encoding device eachcomprise a control unit 2801, such as a CPU (Central Processing Unit)which controls the overall device, a main storage 2802, such as a ROM(Read Only Memory) or a RAM (Random Access Memory) which stores variousdata or programs, an auxiliary storage 2803, such as an HDD (Hard DiskDrive) or a CD (Compact Disk) drive which stores various data orprograms, and a bus connecting these elements. This is a hardwareconfiguration utilizing a conventional computer. Further, the decodingdevice, and the encoding device are connected wirelessly or through awire to a communication I/F (Interface) 2804 which controlscommunication with an external device, a display 2805 which displaysinformation, and an operating unit 2806, such as a keyboard or a mousewhich receives instructions input by the user. Data to be encoded anddata to be decoded may be stored in the HDD, or input by the disk drivedevice, or input externally via the communication I/F 2804.

The hardware configuration illustrated in FIG. 32 is a mere example. Thedecoding device, and the encoding device of each embodiment may beimplemented partly or entirely by an integrated circuit such as an LSI(Large Scale Integration) circuit or an IC (Integrated Circuit) chipset. The functional blocks of the decoding device and the encodingdevice may be individually formed as a processor, or may be integratedpartly or entirely as a processor. Integration of the circuits of theconfiguration is not limited to an LSI, but may be implemented as adedicated circuit or a general-purpose processor.

The functional configuration of the device (the decoding device, and theencoding device) will be described in detail below.

First Embodiment

FIG. 1 is a schematic diagram illustrating an encoding device 10according to a first embodiment.

The encoding device 10 performs encoding after changing the resolutionof the color-difference component of an original image. Herein, theoriginal image contains the luminescence component and thecolor-difference component. The resolution of the color-differencecomponent has various color-difference formats such as the 4:4:4 format,the 4:2:2 format, and the 4:2:0 format. An original image having any oneof those color-difference formats is input to the encoding device 10.

The explanation is given for an example in which an original image thathas the 4:4:4 format as the color-difference format is input to theencoding device 10. However, that is not the only possible case.

The encoding device 10 includes a converting unit 12, an encoding unit14, a generating unit 16, a NAL unit generating unit 18, and atransmission information generating unit 20.

The converting unit 12 performs filter processing with respect to anoriginal image so as to perform resolution conversion with respect tothe color-difference component of the original image. Then, theconverting unit 12 outputs the original image that has the convertedresolution of the color-difference component as a color-differenceconversion image. The explanation is given for a case in which theconverting unit 12 increases the resolution of the color-differencecomponent (i.e., performs up-sampling) of an original image.

FIG. 2 is a schematic diagram illustrating the converting unit 12.

The converting unit 12 includes one or more converting units thatconvert resolution of the color-difference component of an originalimage that is input to the encoding device 10. Meanwhile, resolutionconversion performed by the converting unit 12 with respect to thecolor-difference component is sometimes referred to as color-differenceformat conversion. The converting unit 12 includes a converting unit12A, a converting unit 12B, and an output adjusting unit 12C.

The converting unit 12A converts the original image having the 4:4:4format into an image having the 4:2:2 format. More specifically, withrespect to the color-difference component of each pixel constituting theoriginal image having the 4:4:4 format, the converting unit 12A performsfilter processing using a filter that decimates the color-differencecomponent to half in the horizontal direction. That is, the convertingunit 12A performs down-sampling that decimates the color-differencecomponent of the pixels, which constitute the original image having the4:4:4 format, to half in the horizontal direction and converts theoriginal image into an image having the 4:2:2 format. Then, theconverting unit 12A outputs the image having the 4:2:2 format to theconverting unit 12B.

Thus, the converting unit 12B receives an image having the 4:2:2 formatfrom the converting unit 12A. Then, the converting unit 12B converts theimage having the 4:2:2 format into an image having the 4:2:0 format.More specifically, with respect to the color-difference component ofeach pixel constituting the image having the 4:2:2 format, theconverting unit 12B performs filter processing using a filter thatdecimates the color-difference component to half in the verticaldirection. That is, the converting unit 12B performs down-sampling thatdecimates the color-difference component of the pixels, which constitutethe image having the 4:2:2 format, to half in the vertical and convertsthat image into an image having the 4:2:0 format. Then, the convertingunit 12B outputs the image having the 4:2:0 format to the outputadjusting unit 12C.

Then, the output adjusting unit 12C performs a clipping operation so asto ensure that the value of each pixel constituting the received image,which has the 4:2:0 format and which is received from the convertingunit 12B, falls in a range between the smallest value and the largestvalue set according to a standard. Then, to the encoding unit 14, theoutput adjusting unit 12C outputs the post-clipping image as acolor-difference conversion image that has been subjected tocolor-difference conversion in the converting unit 12. Thus, thecolor-difference conversion image points to the original image after theconvening unit 12 has converted resolution of the color-differencecomponent.

Returning to the explanation with reference to FIG. 1, the convertingunit 12 outputs the color-difference conversion image to the encodingunit 14. Moreover, the converting unit 12 outputs color-differencesignal information to the generating unit 16.

The color-difference signal information contains filter informationthat, is used in filter processing performed by the converting unit 12.The color-difference signal information contains the following: theoriginal image that has the 4:4:4 format and that is received by theconverting unit 12A; filter information that is used in filterprocessing performed by the converting unit 12A; the image that has the4:2:2 format and that is received by the converting unit 12B; and filterinformation that is used in filter processing performed by theconverting unit 12B.

The filter information used in filter processing performed by theconverting unit 12A is horizontal down-sampling filter information.Similarly, the filter information used in filter processing performed bythe converting unit 12B is vertical down-sampling filter information.

The encoding unit 14 receives a color-difference conversion image fromthe converting unit 12. Then, the encoding unit 14 encodes thecolor-difference conversion image and generates encoded data. Theencoding unit 14 divides a single frame into slices each of which ismade of a plurality of pixel areas, and performs encoding on aslice-by-slice basis.

FIG. 3 is a schematic diagram illustrating the encoding unit 14.

The encoding unit 14 includes a subtracting unit 14A, atransform/quantization unit 14B, an entropy encoding unit 14C, aninverse quantization inverse transform unit 14D, an adding unit 14E, aframe memory 14F, a predicted image generating unit 14G, and a motionvector searching unit 14H.

The subtracting unit 14A receives a color-difference conversion imagefrom the converting unit 12. Then, the subtracting unit 14A obtains thedifference between the color-difference conversion image and a predictedimage, which is generated by the predicted image generating unit 14G;and generates an error image representing that difference.

The transform/quantization unit 14B performs transform with respect tothe error image to generate transform coefficients, and quantizes thetransform coefficients to generate quantized coefficients. Examples ofthe method for performing transform with respect to the error imageinclude orthogonal transformation using the discrete cosine transform(DCT), wavelet transform, and independent component analysis. Thetransform/quantization unit 14B performs conversion with respect to theerror image by implementing any one of those methods. Moreover, thetransform/quantization unit 14B quantizes the transform coefficientsusing a quantization parameter set in advance.

Then, the transform/quantization unit 14B outputs the quantizedcoefficients to the entropy encoding unit 14C and the inversequantization: transform unit 14D.

Thus, the entropy encoding unit 14C receives the quantized coefficientsfrom the transform/quantization unit 14B. Moreover, the entropy encodingunit 14C receives motion vector information from the motion vectorsearching unit 14H (described later). Then, the entropy encoding unit14C performs entropy encoding with respect to the quantized coefficientsand the motion vector information according to a predetermined syntax,and generates encoded data. Herein, the syntax points to the settingrules regarding the encoded data.

Meanwhile, the entropy encoding unit 14C performs entropy encodingusing, for example, Huffman encoding or arithmetic encoding.

Then, the entropy encoding unit 14C outputs the generated encoded datato the NAL unit generating unit 18.

The inverse quantization/inverse transform unit 14D performs inversequantization with respect to the quantized coefficients and thenperforms inverse transform to generate an error image. That is, withrespect to the quantized coefficients, the inverse quantization/inversetransform unit 14D performs opposite processing to the processingperformed by the transform/quantization unit 14B. More particularly,when the transform/quantization unit 14B performs wavelet transform andquantization in that order, the inverse quantization/inverse transformunit 14D performs inverse quantization and inverse wavelet transform inthat order.

The adding unit 14E receives the error image from the inversequantization/inverse transform unit 14D and receives the predicted imagefrom the predicted image generating unit 14G. Then, the adding unit 14Eadds the error image and the predicted image to obtain a decoded image.Subsequently, the decoded image is stored in the frame memory 14F.

The frame memory 14F performs filter processing with respect to thedecoded image and stores it as a reference image. Then, the frame memory14F outputs the reference image to the predicted image generating unit14G and the motion vector searching unit 14H.

The motion vector searching unit 14H generates motion vector informationby referring to the color-difference conversion image received from theconverting unit 12 and the reference image received from the framememory 14F. Then, the motion vector searching unit 14H outputs themotion vector information to the predicted image generating unit 14G andthe entropy encoding unit 14C.

The predicted image generating unit 14G generates a predicted image byreferring to the reference image and the motion vector information.Then, the predicted image generating unit 14G outputs the predictedimage to the adding unit 14E and the subtracting unit 14A.

Meanwhile, the reference image generated by the frame memory 14F has thesame color-difference format as that of the color-difference conversionimage. That is, the reference image has the 4:2:0 format, which is thesame as the color-difference format of the color-difference conversionimage obtained when the converting unit 12 performs resolutionconversion with respect to the color-difference component. The framememory 14F outputs the reference image, which has the 4:2:0 formation,to the generating unit 16.

Returning to the explanation with reference to FIG. 1, the generatingunit 16 receives the color-difference signal information from theconverting unit 12. Moreover, the generating unit 16 receives, from theencoding unit 14, the reference image having the same color-differenceformat (i.e., the 4:2:0 format) as the format of the color-differenceconversion image. Then, the generating unit 16 generatescolor-difference conversion information by referring to thecolor-difference signal information and the reference image having thecolor-difference format of the color-difference conversion image.

The color-difference conversion information contains a firstcolor-difference format, and contains filter information of the filterused to convert the color-difference format of a decoded image that isobtained by decoding the encoded data.

The explanation is given for an example in which the color-differenceconversion format contains the first color-difference format, a secondcolor-difference format, and the filter information.

The first color-difference format indicates the resolution of thecolor-difference component of the encoded data, that is, indicates thecolor-difference format of the encoded data obtained by the encodingunit 14 by means of encoding. In other words, the first color-differenceformat is the color-difference format of a color-difference conversionimage. The first color-difference format points to the 4:2:0 format.Meanwhile, in the following explanation, the resolution of thecolor-difference component is sometimes simply referred to as thecolor-difference format.

The second color-difference format is a color-difference format in whichthe decoded image of the encoded data is output. More particularly, thesecond color-difference format is used to reproduce the decoded imageobtained by decoding the encoded data. The second color-differenceformat is determined depending on the mode of reproduction, the type ofthe reproducing device, etc. The second color-difference formation isset in advance in the generating unit 16. Alternatively, the secondcolor-difference format may be received by the encoding device 10 alongwith the original image. Still alternatively, the secondcolor-difference format may be received from an external, device via acommunication unit (not illustrated).

The filter information is including infatuation to specify the filter.Or the filter information is including a filter coefficient. In thisembodiment, the filter information is used to identify a filter that isused in converting color-difference format of a decoded image.

The explanation is given for an example in which the filter informationis used to identify a filter that is used in converting a decoded imagehaving the first color-difference format into a decoded image having thesecond color-difference format. Thus, the explanation is given for anexample in which the filter information is information that is usedwhile converting a decoded image having the first color-differenceformat into a decoded image having the second color-difference format.The filter information contains, for example, filter coefficients.

Moreover, the filter information may also contain information for thesecond color-difference format. Herein, the filter information may beinformation such as a flag that is used to identify the secondcolor-difference format, or may be the second color-difference formatitself.

FIG. 4 is a schematic diagram illustrating the generating unit 16.

The generating unit 16 receives color-difference signal information fromthe converting unit 12. Moreover, the generating unit 16 receives, fromthe encoding unit 14, a reference image having the same color-differenceformat (i.e., the 4:2:0 format) as the format of the color-differenceconversion image.

As described above, the color-difference signal information contains thefollowing: the original image that has the 4:4:4 format and that isreceived by the converting unit 12A; filter information that is used infilter processing performed by the converting unit 12A; the image thathas the 4:2:2 format and that is received by the converting unit 12B;and filter information that is used in filter processing performed bythe converting unit 12B.

The generating unit 16 includes a vertical filter information generatingunit 16A, a converting unit 16B, a horizontal filter informationgenerating unit 16C, and a generating unit 16D.

The vertical filter information generating unit 16A receives, from thecolor-difference signal information, the image having the 4:2:2 formatand the filter information used in filter processing performed by theconverting unit 12B (i.e., vertical down-sampling filter information).Moreover, the vertical filter information generating unit 16A receives,from the encoding unit 14, a reference image having the samecolor-difference format (i.e., the 4:2:0 format) as the format of thecolor-difference conversion image.

Then, the vertical filter information generating unit 16A refers to theimage having the 4:2:2 format, refers to vertical down-sampling filterinformation used in filter processing performed by the converting unit12B, and refers to the reference image having the 4:2:0 format that isthe image having the color-difference format after the conversionperformed by the converting unit 12B; and designs filter informationthat is used in converting an image having the 4:2:0 format into animage having the 4:2:2 format.

That is, the vertical filter information generating unit 16A performsvertical up-sampling with respect to the reference image having the4:2:0 format, and designs filter information to be used in obtaining animage having the 4:2:2 format. Then, the vertical filter informationgenerating unit 16A outputs vertical filter information, which is thefilter information that has been designed, to the converting unit 16Band the generating unit 16D.

While designing the filter information, Equations (1) to (3) given beloware used.

$\begin{matrix}{F = \left( {f_{1}f_{2}\mspace{14mu}\ldots\mspace{14mu} f_{n}} \right)} & (1) \\{{S_{F}(x)} = {\sum\limits_{i = 0}^{n}{f_{i}{s\left( {x + i} \right)}}}} & (2) \\{{\frac{\partial}{\partial f_{i}}\left( {\sum\limits_{x \in X}\left( {{S_{F}(x)} - {S_{org}(x)}} \right)^{2}} \right)} = 0} & (3)\end{matrix}$

Herein, Equations (1) to (3) are, formulae for calculating a filtercorresponding to the least mean square of the difference between thecolor-difference component of a pre-filter-processing image and thecolor-difference component of a post-filter-processing image. That is,Equations (1) to (3) are formulae for calculating a Wiener filter.

In Equation (1), F represents a filter coefficient set; f₁ to f_(n)represent filter coefficients; and n is an integer equal to or greaterthan one.

In Equation (2), S represents the color-difference component of apost-filter processing image; and x represents the position of a pixel.In Equations (2) and (3), S_(F)(x) represents a post-filter-processingimage signal. In Equation (3), S_(org) represents the color-differencecomponent of a pre-filter-processing image.

The converting unit 16B receives, from the encoding unit 14, thereference image having the same color-difference format (i.e., the 4:2:0format) as the format of the color-difference conversion image.Moreover, the converting unit 16B receives the vertical filterinformation from the vertical filter information generating unit 16A.

Then, the converting unit 16B performs filter processing using thevertical filter information and converts the reference image, which hasthe same color-difference format (i.e., the 4:2:0 format) as the formatof the color-difference conversion image, into an image having the 4:2:2format. Then, the converting unit 16B outputs the image having the 4:2:2format to the horizontal filter information generating unit 16C.

The horizontal filter information generating unit 16C receives, from thecolor-difference signal information, the original image that has the4:4:4 format and that is received by the converting unit 12A; and thefilter information used in filter processing performed by the convertingunit 12A (i.e., the horizontal down-sampling filter information).Moreover, the horizontal filter information generating unit 16C receivesthe image having the 4:2:2 from the converting unit 16B.

The horizontal filter information generating unit 16C refers to theimage having the 4:4:4 format, refers to the horizontal down-samplingfilter information, and refers to the image having the 4:2:2 format; anddesigns filter information that is used in converting an image havingthe 4:2:2 format into an image having the 4:4:4 format. While designingthe filter information, Equations (1) to (3) given above are used.

That is, the horizontal filter information generating unit 16C performshorizontal up-sampling with respect to the reference image having the4:2:2 format, and designs filter information to be used in obtaining animage having the 4:4:4 format. Then, the horizontal filter informationgenerating unit 16C outputs horizontal filter information, which is thefilter information that has been designed, to the generating unit 16D.

The generating unit 16D generates color-difference conversioninformation. More specifically, as the first color-difference format ofthe encoded data encoded by the encoding unit 14, the generating unit16D uses the color-difference format of the reference image received bythe encoding unit 14 (i.e., the 4:2:0 format). Moreover, the generatingunit 16D reads, from a memory (not illustrated), the secondcolor-difference format that is used when a decoded image that isobtained by decoding the encoded data is output. Furthermore, as thefilter information, the generating unit 16D makes use of the verticalfilter information, which is received from the vertical filterinformation generating unit 16A, and makes use of the horizontal filterinformation, which is received from the horizontal filter informationgenerating unit 16C. Then, the generating unit 16D generates thecolor-difference conversion information that contains the firstcolor-difference format, the second color-difference format, and thefilter information.

Herein, the generating unit 16D generates the color-differenceconversion infatuation according to predetermined setting rules(syntax).

FIG. 5 is a diagram illustrating an exemplary syntax of thecolor-difference conversion information.

As illustrated in FIG. 5, the color-difference conversion informationcontains coded_format_idc, coded_data_bit_depth, target_format_idc,target_bit_depth, max_value, min_value, progressive_flag,implicit_vertical_flag, tap_length_vertical_minus1, ver_filter_coeff,implicit_horizontal_flag, interpolation_horizontal_idc,tap_length_horizontal_minus1, and hor_filter_coeff.

Herein, coded_format_idc represents the first color-difference format.

For example, when the value of coded_format_idc is equal to “0”, itindicates that the first color-difference format is a monochrome formathaving only the luminescence specified. However, when the value ofcoded_format_idc is equal to “1”, it indicates that the firstcolor-difference format is the 4:2:0 format. Moreover, when the value ofcoded_format_idc is equal to “2”, it indicates that the firstcolor-difference format is the 4:2:2 format. Furthermore, when the valueof coded_format_idc is equal to “3”, it indicates that the firstcolor-difference format is the 4:4:4 format.

Meanwhile, coded_data_bit_depth represents the pixel bit length of theencoded data.

Moreover, target_format_idc represents the second color-differenceformat, which is the color-difference format that is used when a decodedimage obtained by decoding the encoded data is output. Furthermore,target_bit_depth represents the pixel bit length at the time of output.Moreover, max_value represents the maximum value of the color-differencecomponent at the time of output. Furthermore, min_value represents theminimum value of the color-difference component at the time of output.

Moreover, progressive_flag is a flag that indicates whether or not theencoded data is a progressive signal. For example, when the value ofprogressive_flag is equal to “0”, it indicates that the encoded data isnot a progressive signal but an interlaced signal, which means that thecolor-difference conversion operation needs to be performed on afield-by-field basis.

Meanwhile, implicit_vertical_flag, interpolation_vertical_idc,tap_length_vertical_minus1, ver_filter_coeff, implicit_horizontal_flag,interpolation_horizontal_idc, tap_length_horizontal_minus1, andhor_filter_coeff represent the filter information.

Herein, implicit_vertical_flag is a flag that indicates the use ofpredefined filter information in the vertical direction. Moreover,interpolation_vertical_idc represents identification information that isused to identify the predefined filter information in the verticaldirection. Furthermore, tap_length_vertical_minus1 represents the valuesmaller by one than the tap length of the filter coefficients in thevertical direction.

Moreover, ver_filter_coeff represents the filter coefficients in thevertical direction. Furthermore, implicit_horizontal_flag is a flag thatindicates the use of predefined filter information in the horizontaldirection. Moreover, interpolation_horizontal_idc representsidentification information that is used to identify the predefinedfilter information in the horizontal direction. Furthermore,tap_length_horizontal_minus1 represents the value smaller by one thanthe tap length of the filter coefficients in the horizontal direction.Moreover, hor_filter_coeff represents the filter coefficients in thehorizontal direction.

For example, it is assumed that the value of coded_format_idc is equalto “1”. That is, it is assumed that the first color-difference format,which is the format of the encoded data, is the 4:2:0 format. Moreover,it is assumed that the value of target_format_idc is equal to or greaterthan “1”. That is, it is assumed that the second color-difference formatthat is used when the decoded image is output is either the 4:2:2 formator the 4:4:4 format. In this case, it is necessary to performup-sampling in the vertical direction. For that reason, in this case,the generating unit 16 generates the filter information in the verticaldirection (i.e., generates the vertical up-sampling filter information)as the filter information.

Alternatively, it is assumed that the value of coded_format_idc isgreater than “1”. That is, it is assumed that the first color-differenceformat, which is the format of the encoded data, is either the 4:2:2format or the 4:4:4 format. Moreover, it is assumed that the value oftarget_format_idc is equal to “1”. That is, it is assumed that thesecond color-difference format that is used when the decoded image isoutput is the 4:2:0 format. In this case, the filter information pointsto the filter information in the vertical direction (the verticaldown-sampling filter information).

Still alternatively, it is assumed that the value of coded_format_idc isequal to “1” or “2”. That is, it is assumed that the firstcolor-difference format is either the 4:2:0 format or the 4:2:2 format.Moreover, it is assumed that the value of target_format_idc is equal to“3”. That is, it is assumed that the second color-difference format isthe 4:4:4 format. In this case, the filter information points to thefilter information in the horizontal direction (the horizontalup-sampling, filter information).

Still alternatively, it is assumed that the value of coded_format_idc isequal to “3”. That is, it is assumed that the first color-differenceformat is the 4:4:4 format. Moreover, it is assumed that the value oftarget_format_idc is equal to “1” or “2”. That is, it is assumed thatthe second color-difference format is either the 4:2:0 format or the4:2:2 format. In this case, the filter information points to the filterinformation in the horizontal direction (the horizontal down-samplingfilter information).

Meanwhile, in FIG. 5, u(n) represents the non-negative binaryrepresentation of n bits. Herein, n is an integer equal to or greaterthan one. Moreover, se(v) represents a signed and zero-dimensionalexponential-Golomb code.

In a memory (not illustrated) of the generating unit 16, the encodingdevice 10 stores in advance a definition table in which the predefinedfilter information in the vertical direction, the predefined filterinformation in the horizontal direction, and the identificationinformation that is used to identify such filter information is storedin a corresponding manner.

FIG. 6 is a schematic diagram illustrating an exemplary data structureof definition information.

The definition information points to a table in which “value”, “taplength”, and “filter coefficients” are stored in a corresponding manner.

Herein, “value” points to the identification information of the filterinformation, and corresponds to the value indicated byinterpolation_vertical_idc or interpolation_horizontal_idc.

Moreover, “tap length” represents the tap length of the filtercoefficients corresponding to the value of “value” that is theidentification information of the filter information. Furthermore,“filter coefficients” represents the filter coefficients correspondingto the value of “value” that is the identification information of thefilter information.

Meanwhile, the color-difference conversion information may not containthe information obtained from the encoded data or the output informationthat has been standardized.

FIG. 7 is a diagram illustrating an exemplary syntax of thecolor-difference conversion information in the case when thecolor-difference conversion information does not contain the informationobtained from the encoded data or the output information that has beenstandardized.

More particularly, the color-difference version information illustratedin FIG. 7 contains target_format_idc, progressive_flag,implicit_vertical_flag, tap_length_vertical_minus1, ver_filter_coeff,implicit_horizontal_flag, interpolation_horizontal_idc,tap_length_horizontal_minus1, and hor_filter_coeff.

Thus, in the example illustrated in FIG. 7, the color-differenceconversion information toes not contain the first color-differenceformat, which is the color-difference format of the encoded data, andthe pixel bit length. Moreover, in the example illustrated in FIG. 7,the color-difference conversion information does not contain the pixelbit length at the time of output as well as does not contain the maximumvalue and the minimum value of the color-difference component at thetime of output.

As described above, as long as the color-difference conversioninformation contains the first color-difference format that indicatesthe resolution of the color-difference component of the encoded data,and contains the filter information of the filter to be used inconverting the color-difference format of a decoded image that isobtained by decoding the encoded data; it serves the purpose.

FIG. 8 is a schematic diagram illustrating an exemplary syntax of thecolor-difference conversion information. In FIG. 8 is illustrated anexample in which the color-difference conversion information containsthe first color-difference format, the pixel sample position of thecolor-difference component of the encoded data, and the filterinformation.

In the example illustrated in FIG. 8, the color-difference conversioninformation contains chroma_loc_info_present_flag,chroma_sample_loc_type_top_field, chroma_sample_loc_type_bottom_field,chroma_filter_info_present_flag, and chroma_filter_info.

Herein, chroma_loc_info_present_flag is a flag that indicates whether ornot the pixel position of a color-difference signal is present andindicates whether or not the filter information related tocolor-difference conversion is present. For example, when the value ofchroma_loc_info_present_flag is equal to “1”, it indicates that thepixel position of a color-difference signal is present as well as thefilter information related to color-difference conversion is present. Incontrast, when the value of chroma_loc_info_present_flag is equal to“0”, it indicates that neither the pixel position of a color-differencesignal is present nor the filter information related to color-differenceconversion is present.

Moreover, chroma_sample_loc_type_top_field indicates the pixel sampleposition of the color-difference component of the top field (i.e., thepixel position of the target for sampling) when the encoded data isobtained by encoding with the use of interlaced scanning Regarding thepixel sample position of the color-difference component of the topfield, in all there are six known combinations by taking, intoconsideration the combinations with the pixel sample position of theluminescence component.

Furthermore, chroma_sample_loc_type_bottom_field indicates the pixelsample position of the color-difference component of the bottom field(i.e., the pixel position of the target for sampling) when the encodeddata is obtained by encoding with the use of interlaced scanning. In anidentical manner to the case of the top field, regarding the pixelsample position of the color-difference component of the top field, inall there are six known combinations by taking into consideration thecombinations with the pixel sample position of the luminescencecomponent.

Moreover, chroma_filter_info_present_flag is a flag that indicateswhether or not the filter information related to color-differenceconversion is present. When the value of chroma_filter_info_present_flagis equal to “1”, it indicates that the filter information related tocolor-difference conversion is present. In contrast, when the value ofchroma_filter_info_present_flag is equal to “0”, it indicates that thefilter information related to color-difference conversion does notexist.

Furthermore, chroma_filter_info is the identification information ofcolor-difference conversion filter information. The color-differenceconversion filter information that corresponds to the identificationinformation of color-difference conversion filter information is set inadvance in color-difference conversion filter definition information.

FIG. 9 is a schematic diagram illustrating an exemplary data structureof the color-difference conversion filter definition information.Herein, the color-difference conversion filter definition informationpoints to a table in which the identification information ofcolor-difference conversion filter information (in FIG. 9, correspondingto “value”) and the color-difference conversion filter informationidentified by the identification information is stored in acorresponding manner.

Besides, in the example illustrated in FIG. 9, the color-differenceconversion filter definition information contains “tap length”, “filtercoefficients”, “divisor”, “phase shift”, and “purpose”.

Herein, “tap length” represents the tap length of the filtercoefficients. Moreover, “filter coefficients” represents the filtercoefficients. Furthermore, “divisor” represents the value of thedenominator used when division is performed during filter processing.Moreover, “phase shift” represents the phase information of the filter.Furthermore, “purpose” represents the type of filter. More particularly,“purpose” represents the down-sampling filter or the up-sampling filterwhile performing color-difference format conversion.

FIG. 10 is a schematic diagram of another example of the data structureof the color-difference conversion filter definition information. In anidentical manner to FIG. 9, the color-difference conversion filterdefinition information illustrated in FIG. 10 points to a table in whichthe identification information of color-difference conversion filterinformation (in FIG. 10, corresponding to “value”) and thecolor-difference conversion filter information identified by theidentification information is stored in a corresponding manner.

In the example illustrated in FIG. 10, the color-difference conversionfilter definition information contains “tap length”, “filtercoefficients”, “divisor”, “phase shift”, and “purpose”.

In the color-difference conversion filter definition informationillustrated in FIG. 10, when “value” serving as the identificationinformation is a filter value, it indicates that the color-differenceconversion filter information is generated according a predeterminedsyntax.

FIG. 11 is a diagram illustrating an exemplary syntax of thecolor-difference conversion filter information. For example, when“value” representing the identification information in thecolor-difference conversion filter definition information illustrated inFIG. 10 is equal to “1”, the color-difference conversion filterinformation of the syntax illustrated in FIG. 11 is associated inadvance.

In this case, when “value” representing the identification informationin the color-difference conversion filter definition informationillustrated in FIG. 10 is equal to “1”, the generating unit generatesthe color-difference conversion filter information according to thecolor-difference conversion filter information having the syntaxillustrated in FIG. 11.

The color-difference conversion filter information illustrated in FIG.11 contains target_format_idc, num_of_filter_minus1, tap_length_minus1,and filter_coeff.

Herein, target_format_idc is identical to the earlier description.Moreover, num_of_filter_minus1 represents the value smaller by one thanthe color-difference conversion filter count. Furthermore,tap_length_minus1 represents the value smaller by one than the taplength of the filter coefficients. Moreover, filter_coeff represents thefilter coefficients.

FIG. 12 is a diagram illustrating another example of the syntax of thecolor-difference conversion information. As compared to thecolor-difference conversion information illustrated in FIG. 8, thecolor-difference conversion information illustrated in FIG. 12 differsin the way that chroma_filter_info is not included.

In the example illustrated in FIG. 12, the color-difference conversioninformation contains chroma_loc_info_present_flag,chroma_sample_loc_type_top_field, chroma_sample_loc_type_bottom_field,and chroma_filter_info_present_flag.

Herein, chroma_filter_info_present_flag is a flag that indicates whetheror not the filter information related to color-difference conversion ispresent separately. When the value of chroma_filter_info_present_flag isequal to “1”, it indicates that the filter information related tocolor-difference conversion is present. In contrast, when the value ofchroma_filter_info_present_flag is equal to “0”, it indicates that thefilter information related to color-difference conversion does notexist.

FIG. 13 is a diagram illustrating an example of the color-differenceconversion filter information that is present when the value ofchroma_filter_info_present_flag in the color-difference conversioninformation illustrated in FIG. 12 is equal to “1”.

The color-difference conversion filter information illustrated in FIG.13 contains num_of_filter_set_minus1, implicit_filter_set_flag,filter_set_idc, num_of_filter_minus1, implicit_filter_flag, filter_idc,tap_length_minus1, and filter_coeff.

Herein, num_of_filter_set_minus1 represents the value smaller by onethan the filter set count. Moreover, implicit_filter_set_flag is a flagindicating that the information of a predefined filter set is used.Furthermore, filter_set_idc represents identification information thatis used to identify the information of the predefined filter set.Moreover, num_of_filter_minus1 represents the value smaller by one thanthe color-difference conversion filter count. Furthermore,implicit_filter_flag is a flag that indicates the use of predefinedfilter information. Moreover, filter_idc represents the identificationinformation of the predefined filter information. Furthermore,tap_length_minus1 represents the value smaller by one than the taplength of the filter coefficients. Moreover, filter_coeff represents thefilter coefficients.

FIG. 14 is a schematic diagram illustrating an exemplary data structureof the color-difference conversion filter definition information. Thedata structure illustrated in FIG. 14 is different than the exampleillustrated in FIG. 9. In the example illustrated in FIG. 14, thecolor-difference conversion filter definition information points to atable in which “filter_set_idc”, “filter_idc”, “tap_length”,“filter_coefficients”, “divisor”, “phase shift”, and “purpose” arestored in a corresponding manner.

Herein, “filter_set_idc” represents the identification information thatis used to identify the information of the filter set. The value of“filter_set_idc” corresponds to filter_set_idc illustrated in FIG. 13.

Moreover, “filter_idc” represents the identification information that isused to identify the filter information. The value of “filter_idc”corresponds to filter_idc illustrated in FIG. 13.

Furthermore, “tap length” represents the tap length of the filtercoefficients as described above. Moreover, “filter coefficients”represents the filter coefficients. Further r lore, “divisor” representsthe value of the denominator used when division is performed duringfilter processing. Moreover, “phase shift” represents the phaseinformation of the filter. Furthermore, “purpose” represents the purposeof the filter, and indicates the down-sampling filter or the up-samplingfilter while performing color-difference format conversion.

FIG. 15 is a diagram illustrating an example of the color-differenceconversion filter information in the case when the value ofchroma_filter_info_present_flag in the color-difference conversionfilter definition information illustrated in FIG. 14 is equal to “1”.

The color-difference conversion filter information illustrated in FIG.15 contains target_format_idc, implicit_vertical_flag,vertical_filter_idc, tap_length_vertical_minus1, ver_filter_coeff,second_filter_flag, second_vertical_filter_idc,tap_length_second_vertical_minus1, second_ver_filter_coeff,implicit_horizontal_flag, horizontal_filter_idc,tap_length_horizontal_minus1, and hor_filter_coeff.

Herein, in an identical manner to FIG. 5, target_format_idc representsthe second color-difference format. However, in the color-differenceconversion filter information illustrated in FIG. 15, the meaning givento the value of target_format_idc is different than the meaning givenwith reference to FIG. 5. More particularly, in the example illustratedin FIG. 15, when the value of target_format_idc is set to “0”, itindicates that the second color-difference format is a monochrome formathaving only the luminescence specified. In contrast, when the value oftarget_format_idc is set to “1”, it indicates that the secondcolor-difference format is the 4:2:0 format. Moreover, when the value oftarget_format_idc is set to “2”, it indicates that the secondcolor-difference format is the 4:2:2 format. Furthermore, when the valueof target_format_idc is set to “3”, it indicates that the secondcolor-difference format is the 4:4:4 format.

Meanwhile, chroma_format_idc is included in the encoded data, andrepresents the first color-difference format.

Moreover, implicit_vertical_flag is a flag that indicates the use ofpredefined filter information in the vertical direction. Furthermore,vertical_(—) filter_idc represents the identification information thatis used to identify the predefined filter information in the verticaldirection. Moreover, tap_length_vertical_minus1 represents the valuesmaller by one than the tap length of the filter coefficients in thevertical direction.

Furthermore, ver_filter_coeff represents the filter coefficient set inthe vertical direction. Moreover, second_filter_flag is a flag definedregarding a field signal in the case when different filter sets in thevertical direction are used in the top field and the bottom field. Ifthe value of second_filter_flag is set to “1”, then it is possible todefine a second vertical filter.

Furthermore, second_vertical_filter_idc represents the identificationinformation that is used to identify the second set of predefined filterinformation in the vertical direction. Moreover,tap_length_second_vertical_minus1 represents the value smaller by onethan the tap length of the second filter coefficient set in the verticaldirection. Furthermore, second_ver_filter_coeff represents the secondfilter coefficient set in the vertical direction.

Furthermore, implicit_horizontal_flag is a flag that indicates the useof predefined filter information in the horizontal direction.

Moreover, horizontal_filter_idc represents the identificationinformation that is used to identify the predefined filter informationin the horizontal direction. Furthermore, tap_length_horizontal_minus1represents the value smaller by one than the tap length of the filtercoefficients in the horizontal direction. Moreover, hor_filter_coeffrepresents the filter coefficients in the horizontal direction.

For example, it is assumed that the value of chroma_format_idc is equalto “1”. That is, it is assumed that the first color-difference form tat,which is the format of the encoded data, is the 4:2:0 format. Moreover,it is assumed that the value of target_format_idc is equal to or greaterthan “1”. That is, it is assumed that the second color-difference formatthat is used when the decoded image is output is either the 4:2:2 formator the 4:4:4 format. In that case, it is necessary to performup-sampling in the vertical direction. For that reason, in this case,the generating unit 16 generates the filter information in the verticaldirection (i.e., generates the vertical up-sampling filter information)as the filter information.

Alternatively, it is assumed that the value of coded_format_idc isgreater than “1”. That is, it is assumed that the first color-differenceformat, which is the format of the encoded data, is either the 4:2:2format or the 4:4:4 format. Moreover, it is assumed that the value oftarget_format_idc is equal to “1”. That is, it is assumed that thesecond color-difference format that is used when the decoded image isoutput is the 4:2:0 format. In this case, the filter information pointsto the filter information in the vertical direction (the verticaldown-sampling filter information).

Still alternatively, it is assumed that the value of chroma_format_idcis equal to “1” or “2”. That is, it is assumed that the firstcolor-difference format is either the 4:2:0 format or the 4:2:2 format.Moreover, it is assumed that the value of target_format_idc is equal to“3”. That is, it is assumed that the second color-difference format isthe 4:4:4 format. In this case, the filter information points to thefilter information in the horizontal direction (the horizontalup-sampling filter information).

Still alternatively, it is assumed that the value of chroma_format_idcis equal to “3”. That is, it is assumed that the first color-differenceformat is the 4:4:4 format. Moreover, it is assumed that the value oftarget_format_idc is equal to “1” or “2”. That is, it is assumed thatthe second color-difference format is either the 4:2:0 format or the4:2:2 format. In this case, the filter information points to the filterinformation in the horizontal direction (the horizontal down-samplingfilter information).

FIG. 16 is a schematic diagram illustrating an exemplary data structureof the color-difference conversion filter definition information. Thedata structure illustrated in FIG. 16 is different than the exampleillustrated in FIG. 14.

In the example illustrated in FIG. 16, the color-difference conversionfilter definition information points to a table in which “filter_idc”,“tap length”, “filter coefficients”, “divisor”, “phase shift”, and“purpose” are stored in a corresponding manner.

Herein, “filter_idc” represents the identification information that isused to identify the information of the filter set information. Thevalue of “filter_idc” corresponds to vertical_filter_idc,second_filter_idc, and horizontal_filter_idc specified in thecolor-difference conversion information illustrated in FIG. 15.

Moreover, “tap length” represents the tap length of the filtercoefficients. Furthermore, “filter coefficients” represents the filtercoefficients. Moreover, “divisor” represents the value of thedenominator used when division is performed during filter processing.Furthermore, “phase shift” represents the phase information of thefilter. Moreover, “purpose” represents the purpose of the filter, andindicates a down-sampling filter or an up-sampling filter whileperforming color-difference format conversion.

FIG. 17 is a diagram illustrating an example of the color-differenceconversion filter information in the case when the value ofchroma_filter_info_present_flag, which is specified in thecolor-difference conversion information illustrated in FIG. 8 or FIG.12, is equal to “1”.

The color-difference conversion filter information illustrated in FIG.17 contains target_format_idc, tap_length_vertical_minus1,ver_filter_coeff, second_filter_flag, tap_length_second_vertical_minus1,second_ver_filter_coeff, implicit_horizontal_flag,horizontal_filter_idc, tap_length_horizontal_minus1, andhor_filter_coeff. As compared to the color-difference conversion filterinformation illustrated in FIG. 15, the color-difference conversionfilter information illustrated in FIG. 17 differs in the way that allfilter information is defined in an explicit fashion.

Returning to the explanation with reference to FIG. 1, the generatingunit outputs the color-difference conversion information that has beengenerated to the NAL unit generating unit 18.

The NAL unit generating unit 18 receives the encoded data from theencoding, unit 14. Moreover, the NAL unit generating unit 18 receivesthe color-difference conversion information from the generating unit 16.

Then, the NAL unit generating unit 18 generates NAL unit information(where NAL stands for Network Abstraction Layer) that contains theencoded data received from the encoding unit 14 contains thecolor-difference conversion information received from the generatingunit 16, and contains byte alignment information which is headerinformation and adjustment information at the time of performing readingand writing. Then, the NAL unit generating unit 18 outputs the NAL unitinformation to the transmission information generating unit 20.

Herein, the NAL unit information is information corresponding to ahigh-level syntax included in the transmission information (describedlater) that is output by the encoding device 10. In the structure(syntax) of the transmission information, the high-level syntax islocated at an upper level than the slice syntax, and contains parametersthat affect the entire frame of the transmission information. Asdescribed above, the NAL unit information contains the encoded data,contains the color-difference conversion information received from thegenerating unit 16, and contains byte alignment information which isheader information and adjustment information at the time of performingreading and writing.

The transmission information generating unit 20 receives the NAL unitinformation from the NAL unit generating unit 18. Then, the transmissioninformation generating unit 20 converts the NAL unit information intothe information of a system of the MPEG-2 system or the ISO file format,and generates transmission information. Then, the transmissioninformation generating unit 20 outputs the transmission information.

Given below is the explanation of an encoding operation performed in theencoding device 10.

FIG. 18 is a flowchart of the encoding, operation performed in theencoding device 10.

Firstly, the converting unit 12 performs a color-difference convertingoperation fir converting the resolution of the color-differencecomponent of the original image received by the encoding device 10 (StepS100). Then, to the encoding unit 14, the converting unit 12 outputs theoriginal image having the converted resolution of the color-differencecomponent as a color-difference conversion image. Moreover, theconverting unit 12 outputs the color-difference signal information tothe generating unit 16.

Then, the encoding unit 14 encodes the color-difference conversion imagereceived from the convening unit 12, and generates encoded data (StepS102). Subsequently, the encoding unit 14 outputs the encoded data tothe NAL unit generating unit 18. Moreover, the encoding unit 14 outputsa reference image, which has the same color-difference format (i.e., the4:2:0 format) as the format of the color-difference conversion image, tothe generating unit 16.

Then, the generating unit 16 generates color-difference conversioninformation by referring to the color-difference signal informationreceived from the convening unit 12 and by referring to the referenceimage that has the color-difference format of the color-differenceconversion image and that is received from the encoding unit 14 (StepS104). Subsequently, the generating unit 16 outputs the color-differenceconversion information to the NAL unit generating unit 18.

Then, the NAL unit generating unit 18 generates NAL unit informationthat contains the encoded data received from the encoding unit 14,contains the color-difference conversion information received from thegenerating unit 16, and contains byte alignment information which isheader information and adjustment information at the time of performingreading and writing (Step S106). Then, the NAL unit generating unit 18outputs the NAL unit information to the transmission informationgenerating unit 20.

Subsequently, the transmission information generating unit 20 convertsthe NAL unit information into the information of a system layer, andgenerates transmission information (Step S108). Then, the transmissioninformation generating unit 20 outputs the transmission information.

As described above, in the encoding device 10 according to the firstembodiment, the encoding unit 14 encodes a color-difference conversionimage and generates encoded data. Then, the generating unit 16 generatescolor-difference conversion information that contains a firstcolor-difference format indicating the resolution of thecolor-difference component of the encoded data; a secondcolor-difference format indicating the resolution of thecolor-difference component that is used when a decoded image which isobtained by decoding the encoded data is output; and filter informationthat is used to identify a filter that is used in converting the decodedimage of the encoded data having the first color-difference format intoa decoded image having the second color-difference format.

For that reason, when outputting the decoded image that is obtained bydecoding the encoded data encoded by the e coding device 10, the decodedimage of the encoded data having the first color-difference format isconverted into an image having the second color-difference format usinga filter that is identified by the filter information which is includedin the color-difference conversion information. As a result, it becomespossible to suppress the image deterioration occurring due to resolutionconversion.

Thus, in the encoding device 10 according to the first embodiment, itbecomes possible to suppress the image deterioration.

First Modification

In the first embodiment, the explanation is given for a case in whichthe filter information points to filter information that is used inconverting a decoded image having the first color-difference format intoa decoded image having the second color-difference format.

However, as long as the filter information is information that is usedto identify the filter used in converting a decoded image having thefirst color-difference format into a decoded image having the secondcolor-difference format, it serves the purpose. For example, thespecific information can be identification information that is used toidentify the filter information used in converting a decoded imagehaving the first color-difference format into a decoded image having thesecond color-difference format.

In that case, the abovementioned definition information, in which filterinformation is held in a corresponding manner to identificationinformation of the filter information, may be stored in advance in theencoding device 10 as well as in a decoding device that decodes theencoded data (i.e., in a decoding device described later). Then in thedecoding device that decodes the encoded data, the decoded imageobtained by decoding the encoded data can be subjected to filterprocessing using the filter information identified by the identificationinformation included in the filter information. With that, thecolor-difference format of the decoded image can be converted.

Meanwhile, the filter information may also be filter information that isused in filter processing performed by the converting unit 12.

In that case, in a decoding device that decodes the encoded data, afilter that is used in converting the decoded image having the firstcolor-difference format into a decoded image having the secondcolor-difference format is set by referring to the filter informationincluded in the filter information. Then, the decoding device canconvert the color-difference format of the decoded image using thefilter that has been set.

Second Embodiment

In a second embodiment, the explanation is given about generating thecolor-difference conversion information by implementing a differentmethod than the method implemented in the first embodiment.

FIG. 19 is a schematic diagram illustrating an encoding device 10Aaccording to the second embodiment.

The encoding device 10A includes a converting unit 120, the encodingunit 14, a generating unit 160, the NAL unit generating unit 18, and thetransmission information generating unit 20.

Thus, in the encoding device 10A; the converting unit 12 is replacedwith the converting unit 120, and the generating unit 16 is replacedwith the generating unit 160. Apart from that, the configuration of theencoding device 10A is identical to the configuration of the encodingdevice 10 according to the first embodiment.

As far as the converting unit 120 is concerned, apart from the pointthat filter information used by the converting unit 120 is output ascolor-difference signal information to the generating unit 160, theconfiguration of the converting unit 120 is identical to theconfiguration of the converting unit 12. More particularly, to thegenerating unit 160, the converting unit 120 outputs thecolor-difference signal information that contains the filter informationused in filter processing performed by the converting unit 12A and thefilter information used in filter processing performed by the convertingunit 12B. Meanwhile, in the second embodiment, in an identical manner tothe first embodiment, the filter information used in filter processingperformed by the converting unit 12A is horizontal down-sampling filterinformation; while the filter information used in filter processingperformed by the converting unit 12B is vertical down-sampling filterinformation.

The generating unit 160 receives the color-difference signal informationfrom the converting unit 120. Then, the generating unit 160 generatesthe color-difference conversion information by referring to thecolor-difference signal information.

FIG. 20 is a schematic diagram illustrating the generating unit 160.

The generating unit 160 includes a vertical filter informationgenerating unit 160A, a horizontal filter information generating unit160B, and a generating unit 160C.

The vertical filter information generating unit 160A receives, from thecolor-difference signal information, the filter information that is usedin filter processing performed by the converting unit 12B (i.e., thevertical down-sampling filter information).

Then, the vertical filter information generating unit 160A refers to thevertical down-sampling filter information used, in filter processingperformed by the converting unit 12B, and, designs filter informationthat is used in converting an image having the 4:2:0 format into animage having the 4:2:2 format. That is, the vertical filter informationgenerating unit 160A performs vertical up-sampling with respect to adecoded image having the 4:2:0 format, and designs filter information tobe used in obtaining an image having the 4:2:2 format. Herein, whiledesigning the filter information. Equation (4) given below is used.Subsequently, the vertical filter information generating unit 1604outputs vertical filter information, which is the filter informationthat has been designed, to the generating unit 1600.

The horizontal filter information generating unit 160B refers to thefilter information (horizontal down-sampling filter infix ration), whichis used in filter processing performed by the converting unit 12A, inthe color-difference signal information; and designs filter informationthat is used in converting the image having the 4:2:2 format into theoriginal image having the 4:4:4 format. That is, the horizontal filterinformation generating unit 160B performs horizontal up-sampling withrespect to the image having the 4:2:2 format, and designs filterinformation to be used in obtaining the original image having the 4:4:4format. Then, the horizontal filter information generating unit 160Boutputs horizontal filter information, which is the filter informationthat has been designed, to the generating unit 160C.

$\begin{matrix}{{\left. {{D = \left( {d_{1}d_{2}\mspace{14mu}\ldots\mspace{14mu} d_{2n}} \right)}{{U = \left( {u_{1}u_{2}\mspace{14mu}\ldots\mspace{14mu} u_{n}} \right)},{V = \left( {v_{1}v_{2}\mspace{14mu}\ldots\mspace{14mu} v_{n}} \right)}}{X = \underset{\underset{{2n} - 1}{︸}}{\begin{pmatrix}u_{1} & u_{2} & \ldots & u_{n} & \; & \; \\v_{1} & v_{2} & \ldots & v_{n} & \; & \; \\\; & u_{1} & u_{2} & \ldots & u_{n} & \; \\\; & v_{1} & v_{2} & \ldots & v_{n} & \; \\\; & \; & \; & \vdots & \; & \; \\\; & \; & \; & \vdots & \; & \; \\\; & \; & \; & u_{1} & u_{2} & u_{n} \\\; & \; & \; & v_{1} & v_{2} & v_{n}\end{pmatrix}}}} \right\} 2n}{I = \left( {\underset{\underset{n - 1}{︸}}{0\mspace{14mu}\ldots\mspace{14mu} 0}\; 1\underset{\underset{n - 1}{︸}}{0\mspace{14mu}\ldots\mspace{14mu} 0}} \right)}{{DX} = I}} & (4)\end{matrix}$

Herein, Equation (4) is a filter calculation formula that is used by thevertical filter information generating unit 160A and the horizontalfilter information generating unit 160B while designing filters.

More particularly, Equation (4) is a formula that enables designing offilter information in such a way that a one-dimensional image has thesame image quality as an image that is obtained by first up-sampling todouble the color-difference component of each pixel constituting theone-dimensional image and then down-sampling to halve thecolor-difference component of each pixel.

In Equation (4), D represents a vector of down-sampling filtercoefficients, and d₁ to d_(2n) (where n is an integer equal to orgreater than one) represent the filter coefficients of the down-samplingfilter. Moreover, U and V represent vectors of up-sampling filtercoefficients: u₁ to u_(n) (where n is an integer equal to or greaterthan one) represent the filter coefficients used in top fieldup-sampling: and v₁ to v_(n) (where n is an integer equal to or greaterthan one) represent the filter coefficients used in bottom fieldup-sampling.

Furthermore, in Equation (4), X represents a matrix of 2n rows and(2n−1) columns and has the up-sampling filter coefficients as theelements. Moreover, I represents a vector in which the element count is2n−1; in which the n-th element is 1; and in which the remainder is 0.

In order to design the filter information; D, U, and V are designed insuch a way that DX=I is satisfied.

With the use of Equation (4), from the down-sampling filtercoefficients, the corresponding up-sampling filter coefficients can beobtained. Conversely, from the up-sampling filter coefficients, thecorresponding down-sampling filter coefficients can also be obtained.

The generating unit 160C generates color-difference conversioninformation. More specifically, the generating unit 160C uses thecolor-difference format of the reference image (i.e., the 4:2:0 format),which is received from the encoding unit 14, as the firstcolor-difference format of the encoded data obtained by encodingperformed by the encoding unit 14. Moreover, the generating unit 160Creads the second color-difference format from a memory (notillustrated). Furthermore, as the filter information, the generatingunit 160C makes use of the vertical filter information received from thevertical filter information generating unit 160A and the horizontalfilter information received from the horizontal filter informationgenerating unit 16B. Then, the generating unit 160 generates thecolor-difference conversion information that contains the firstcolor-difference format, the second color-difference format, and thefilter information; and outputs the color-difference conversioninformation to the NAL unit generating unit 18.

As described above, in the encoding device 10A according to the secondembodiment, the generating unit 160 receives the filter information,which is used in the converting unit 120, as the color-difference signalinformation. Then, the generating unit 160 generates thecolor-difference conversion information by referring to thecolor-difference signal information.

Hence, when outputting a decoded image that is obtained by decoding theencoded data encoded by the encoding device 10A, the decoded image ofthe encoded data having the first color-difference format is convertedinto a decoded image having the second color-difference format using thefilter information that is identified by the filter information includedin the color-difference conversion information. As a result, it becomespossible to suppress the image deterioration, occurring due toresolution conversion.

Thus, even in the case when the color-difference conversion informationis generated by implementing a different method than the methodimplemented in the first embodiment, it is possible to achieve the sameeffect as the effect achieved in the first embodiment.

Besides, in addition to the effect achieved in the encoding device 10according to the first embodiment, it also becomes possible to simplifythe configuration of the generating unit 160 (the generating unit 16).

Second Modification

Meanwhile, in the first embodiment, the explanation is given for a casein which the converting unit 12 includes two converting units (namely,the converting units 12A and 12B), and the resolution of thecolor-difference component is converted more than once. However,alternatively, the converting unit 12 can be a functional unit thatconverts the color difference only once. Moreover, in the firstembodiment, the explanation is given for a case in which the convertingunit 12 performs filter processing to reduce the resolution of thecolor-difference component (i.e., to perform down-sampling). However,alternatively, the converting unit 12 can be configured to performfilter processing to increase the resolution of the color-differencecomponent (i.e., to perform up-sampling).

In this case, as illustrated in FIG. 19, the encoding device 10Aincludes a converting unit 122 in place of the converting unit 120, andincludes a generating unit 162 in place of the generating unit 160.

FIG. 21 is a schematic diagram illustrating the converting unit 122.Herein, the converting unit 122 includes a converting unit 122A and anoutput adjusting unit 122B.

For example, the converting unit 122 receives an original image havingthe 4:2:0 format. Then, the converting unit 122A converts the originalimage having the 4:2:0 format into an image having the 4:2:2 format.Herein, with respect to the color-difference component of each, pixelconstituting the original image having the 4:2:0 format, the convertingunit 122A performs filter processing using filter information regardingpixel interpolation in the vertical direction. With that, the convertingunit 122A performs up-sampling in which the color-difference componentof each pixel constituting the original image having the 4:2:0 format isinterpolated in the vertical direction. That is, the converting unit122A converts the original image having the 4:2:0 format into an imagehaving the 4:2:2 format. Then, the converting unit 122A outputs thepost-conversion image having the 4:2:2 format to the output adjustingunit 122B.

The output adjusting unit 122B performs a clipping operation so as toensure that the value of each pixel constituting the received image,which has the 4:2:2 format and which is received from the convertingunit 122A, falls in a range between the smallest value and the largestvalue set according to a standard. Then, to the encoding unit 14, theoutput adjusting unit 122B outputs the post-clipping image as acolor-difference conversion image that has been subjected tocolor-difference conversion in the converting unit 122.

Moreover, the output adjusting unit 122B outputs the color-differencesignal information, which contains the filter information used in filterprocessing performed by the converting unit 122A, to the generating unit162.

Given below is the explanation about the generating unit 162.

FIG. 22 is a schematic diagram illustrating the generating unit 162.

The generating unit 162 includes a horizontal filter informationgenerating unit 162A and a generating unit 162B.

The horizontal filter information generating unit 162A receives, as thecolor-difference signal information, the filter information used infilter processing performed by the converting unit 122A (i.e., receivesthe horizontal do gin-sampling filter information).

Then, from the horizontal down-sampling filter information used infilter processing performed by the converting unit 122A, the horizontalfilter information generating unit 162A designs filter information to beused in converting an image having the 4:2:2 format into an image havingthe 4:2:0 format. That is the horizontal filter information generatingunit 162A performs horizontal down-sampling with respect to an imagehaving the 4:2:2 format, and designs the filter information to be usedin obtaining an image having the 4:2:0 format. Then, the horizontalfilter information generating unit 162A outputs horizontal filterinformation, which is the filter information that has been designed, tothe generating unit 162B.

The generating unit 162B generates color-difference conversioninformation. More specifically, the generating unit 162B uses thecolor-difference format of the reference image (i.e., the 4:2:2 format),finch is received by the encoding unit 14, as the first color-differenceformat of the encoded data encoded by the encoding unit 14. Moreover,the generating unit 162B reads the second color-difference format from amemory (not illustrated). Furthermore, as the filter information, thegenerating unit 162B makes use of the horizontal filter informationreceived from the horizontal filter information generating unit 162A.

Then, the generating unit 162B generates the color-difference conversioninformation that contains the first color-difference format, the secondcolor-difference format, and the filter information. Subsequently, thegenerating unit 162B outputs the color-difference conversion informationto the NAL unit generating unit 18.

In this way, even in the case when the con converting unit 122 performsfilter processing to increase the resolution of the color-differencecomponent (i.e., performs up-sampling), the generating unit 162generates the color-difference conversion information that contains thefirst color-difference format, the second color-difference format, andthe filter information.

Hence, in the second modification, it becomes possible to achieve thesame effect as the effect achieved in the first embodiment.

Third Modification

In the embodiments described above, the explanation is given for a casein which color-difference conversion is performed in the encoding device10 or the encoding device 10A. However, alternatively, the configurationmay be such that the converting unit 12 (the converting unit 120 or theconverting unit 122) that performs color-difference conversion is notdisposed.

FIG. 23 is a schematic diagram illustrating a functional configurationof an encoding device 10B.

The encoding device 10B includes the encoding unit 14, the NAL unitgenerating unit 18, the transmission information generating unit 20, andthe generating unit 16.

Apart from the fact that the converting unit 12 is not disposed, theencoding device 10B has the same configuration as the configuration ofthe encoding device 10 according to the first embodiment. In thisembodiment, the encoding unit 14 of the encoding device 10B receives thecolor-difference conversion information from an external device.Moreover, the generating unit 16 receives the color-differenceconversion information from an external device.

In this way, the encoding device 10B can be configured to not includethe converting unit 12.

Third Embodiment

In a third embodiment, the explanation is given about a decoding devicethat decodes the encoded data included in the transmission informationwhich is generated by any one of the encoding devices 10, 10A, and 10B.

FIG. 24 is a schematic diagram illustrating a decoding device accordingto the third embodiment. Herein, a decoding device 50 according to thethird embodiment includes a transmission information decoding unit 52, aNAL unit decoding unit 54, a decoding unit 56, a decoding unit 58, and aconvening unit 60.

The transmission information decoding unit 52 acquire transmissioninformation. In the third embodiment, the explanation is given for anexample in which the transmission information decoding unit 52 acquirestransmission information from the encoding device 10 according to thefirst embodiment. Moreover, in the third embodiment, the explanation isgiven for an example in which the transmission information received fromthe encoding device contains the color-difference conversion informationillustrated in FIG. 5. Then, the transmission information decoding unit52 generates NAL unit information from the transmission information thatis acquired.

The NAL unit decoding unit 54 receives the NAL unit information from thetransmission information decoding unit 52, and decodes the NAL unitinformation. As a result, the NAL unit decoding unit 54 obtains theencoded data, the color-difference conversion information, and the bytealignment information.

Then, the NAL unit decoding unit 54 outputs the encoded data, which isobtained from the NAL unit information, to the decoding unit 56.Moreover, the NAL unit decoding unit 54 outputs the color-differenceconversion information, which is obtained from the NAL unit information,to the decoding unit 58.

The decoding unit 58 decodes the color-difference conversioninformation; and obtains the first color-difference format, thesecond-color difference format, and the filter information. Then, thedecoding unit 58 outputs the obtained information to the converting unit60.

FIG. 25 is a schematic diagram illustrating a functional configurationof the decoding unit 58.

As illustrated in FIG. 25, the decoding unit 58 includes a decoding unit58A that analyzes the color-difference conversion information and readsthe first color-difference format, the second color-difference format,and the filter information from the color-difference conversioninformation. Then, to the converting unit 60, the decoding unit 58Aoutputs the color-difference conversion information that contains thefirst color-difference format, the second color-difference format, andthe filter information.

Meanwhile, if the filter information included in the color-differenceconversion information points to the filter information to be used inconverting a decoded image having the first color-difference format intoa decoded image having the second color-difference format, then thedecoding, unit 58A outputs the filter information without modificationto the converting unit 60.

In contrast, if the filter information included in the color-differenceconversion information points to the identification information that isused to identify the filter information to be used in converting adecoded image having the first color-difference format into a decodedimage having the second color-difference format, then the decoding unit58A reads the filter information identified by the identificationinformation from definition information that is stored in advance in amemory (not illustrated). Then, as the filter information, the decodingunit 58A outputs the read filter information to the converting unit 60.

Alternatively, if the filter information included in thecolor-difference conversion information points to the filter informationthat is used in filter processing performed by the converting unit 12 ofthe encoding device 10; then the decoding unit 58A designs, from thatfilter information, filter information to be used in converting adecoded image having the first color-difference format into a decodedimage having the second color-difference format. Then, as the filterinformation, the decoding unit 58A outputs the designed filterinformation to the converting unit 60.

Returning to the explanation with reference to FIG. 24, the decodingunit 56 decodes the encoded data and obtains a decoded image. Then, thedecoding unit 56 outputs the decoded image to the converting unit 60.

FIG. 26 is a schematic diagram illustrating a functional configurationof the decoding unit 56.

As illustrated in FIG. 26, the decoding unit 56 includes an entropydecoding unit 56A, an inverse quantization/inverse transform unit 56B,an adding unit 56C, a frame memory 56D, and a predicted image generatingunit 56E.

The entropy decoding unit 56A receives the encoded data from the NALunit decoding unit 54. Then, the entropy decoding unit 56A performsentropy decoding with respect to the received encoded data according apredetermined syntax. As a result, the entropy decoding unit 56A obtainsquantized coefficients and motion vector information.

Then, the entropy decoding unit 56A outputs the quantized coefficientsto the inverse quantization/inverse transform unit 56B, and outputs themotion vector information to the predicted image generating unit 56E.

The inverse quantization/inverse transform unit 56B performs inversequantization with respect to the quantized coefficients and thenperforms inverse transform to generate an error image. The adding unit56C receives the error image from the inverse quantization/inversetransform unit 56B and receives a predicted image from the predictedimage generating unit 56E. Then, the adding unit 56C adds the errorimage and the predicted image to obtain a decoded image. Subsequently,the decoded image is stored in the frame memory 56D, and is then outputto the convening unit 60 and the predicted image generating unit 56E.

The predicted image generating unit 56E generates a predicted image byreferring to the decoded image and the motion vector information. Then,the predicted image generating unit 56E outputs that predicted image tothe adding unit 56C.

Returning to the explanation with reference to FIG. 24, the convertingunit 60 receives the decoded image from the decoding unit 56. Moreover,the converting unit 60 receives the color-difference conversioninformation from the decoding unit 58. Then, the converting unit 60reads the first color-difference format, the second color-differenceformat, and the filter information from the color-difference conversioninformation. Subsequently, the converting unit 60 makes use of thefilter identified by the filter information and converts the resolutionof the color-difference component of the decoded image represented bythe first color-difference format. With that, the converting unit 60converts the decoded image having the first color-difference format intoa decoded image having the second color-difference format. Then, theconverting unit 60 outputs the reproducible image, which is obtained byresolution conversion with respect to the color-difference component ofthe decoded image, to a reproducing device.

FIG. 27 is a schematic diagram illustrating the converting unit 60.

The converting unit 60 includes a converting unit 60A, a converting unit60B, and an output adjusting unit 60C.

The converting unit 60A converts a decoded image having the 4:2:0 formatinto a decoded image having the 4:2:2 format. More particularly, fromthe color-difference conversion information received from the decodingunit 58, the converting unit 60A reads, as the filter information, thefilter information used in filter processing performed by the convertingunit 12B. Then, the converting unit 60A performs filter processing usingthe read filter information and converts a decoded image having the4:2:0 format into a decoded image having the 4:2:2 format.

Then, the converting unit 60A outputs the decoded image, which has the4:2:2 format obtained by means of resolution conversion, to theconverting unit 60B. Subsequently, from the color-difference conversioninformation received from the decoding unit 58, the converting unit 60Breads, as the filter information, the filter information used in filterprocessing performed by the converting unit 12A. Then, the convertingunit 60B performs filter processing using the read filter informationand converts the decoded image having the 4:2:2 format into a decodedimage having the 4:4:4 format. Then, the converting unit 60B outputs thedecoded image, which has the 4:4:4 format obtained by means ofresolution conversion, to the output adjusting unit 60C.

The output adjusting unit 60C either reads, from the color-differenceconversion information, the pixel bit length at the time of output, themaximum value of the color-difference component at the time of output,and the minimum value of the color-difference component at the time ofoutput: or performs a clipping operation with respect to the decodedimage in such a way that the pixel bit length, the maximum value, andthe minimum value according to the specifications of a predeterminedcolor-difference format are satisfied. Then, the output adjusting unit60C outputs the post-clipping decoded image as the reproducible image.

Given below is the explanation of a decoding operation performed in thedecoding device 50.

FIG. 28 is a flowchart of the decoding operation performed in thedecoding device 50.

Firstly, the transmission information decoding unit 52 decodes thetransmission information received from the encoding device 10 (StepS200). As a result of the operation performed at Step S200, the NAL unitinformation is obtained.

Then, the NAL unit decoding unit 54 decodes the NAL unit informationobtained at Step S200 (Step S202). As a result of the operationperformed at Step S202, the NAL unit decoding unit 54 obtains theencoded data, the color-difference conversion information, and the bytealignment information.

Subsequently, the decoding unit 56 decodes the encoded data receivedfrom the NAL unit decoding unit 54, and obtains a decoded image (StepS204).

Then, the decoding unit 58 decodes the color-difference conversioninformation (Step S206). As a result of the operation performed at StepS206, the decoding unit 58 reads the first color-difference format, thesecond color-difference format, and the filter information from thecolor-difference conversion information. Subsequently, to the convertingunit 60, the decoding unit 58 outputs the color-difference conversioninformation that contains the first color-difference format, the secondcolor-difference format, and the filter information.

Then, the converting unit 60 performs color-difference conversion toconvert the decoded image received from the decoding unit 56 into adecoded image having the second color-difference format specified in thecolor-difference conversion information (Step S208). Subsequently, theconverting unit 60 outputs the reproducible image, which is obtained byconverting color-difference of the decoded image, to a reproducingdevice. That marks the end of the routine.

As described above, the decoding device 50 receives transmissioninformation that contains color-difference conversion information andencoded data. Then, the decoding device 50 makes use of the filter thatis identified by the filter information included in the color-differenceconversion information: and converts the decoded image that has thefirst color-difference format and that is obtained by the decoding ofthe encoded data into a decoded image having the second color-differenceformat. With that, the decoding device 50 becomes able to suppress theimage deterioration occurring due to resolution conversion.

Consequently, the decoding device 50 according to the third embodimentcan suppress the image deterioration.

Fourth Modification

Given below is the explanation of the operations performed by thedecoding unit 58 and the decoding unit 58A (see FIG. 25) in the casewhen the transmission information decoding unit 52 receives transmissioninformation containing the color-difference conversion informationillustrated in FIG. 8 from the encoding device 10.

In this case, the decoding unit 58A decodes the color-differenceconversion information according to the syntax illustrated in FIG. 8.

As described above, in the color-difference conversion informationillustrated in FIG. 8, chroma_loc_info_present_flag is a flag thatindicates whether or not the pixel position of a color-difference signalis present and indicates whether or not the filter information relatedto color-difference conversion is present. When the value ofaroma_loc_info_present_flag is “0”, the decoding unit 58A assumes thatneither the pixel position of a color-difference signal is present northe filter information related to color-difference conversion ispresent, and thus skips the value of chroma_loc_info_present_flag. Onthe other band, when the value of chroma_loc_info_present_flag is “1”,the pixel position of a color-difference signal is present as well asthe filter information related to color-difference conversion ispresent. Hence, in this case, the decoding unit 58A identifies the pixelsample position of the color difference according to the valuesindicated by chroma_sample_loc_type_top_field andchroma_sample_loc_type_bottom_field.

Moreover, as described above, chroma_filter_info_present_flag is a flagthat indicates whether or not the filter information related tocolor-difference conversion is present. Thus, when the value ofchroma_filter_info_present_flag is “0”, it indicates that the filterinformation related to color-difference conversion does not exist.Hence, the decoding unit 58 skips the value ofchroma_filter_info_present_flag. On the other hand, when the value ofchroma_filter_info_present_flag is “1”, it indicates that the filterinformation related to color-difference conversion is present. In thatcase, the decoding unit 58A reads, from the color-difference conversionfilter definition information illustrated in FIG. 9 or FIG. 10, theidentification information (“value”) indicated by chroma_filter_info.

More particularly, from the color-difference conversion filterdefinition information illustrated in FIG. 9 or FIG. 10, the decodingunit 58A reads the following information corresponding to theidentification information (“value”): the filter coefficients; thedenominator while performing filter processing (i.e., “divisor”); thesample position of a color-difference pixel after filter processing(i.e., “phase shift”): and the usage of the filter information and theinformation on the second color-difference format (i.e., “purpose”).

Meanwhile, as described above, the color-difference conversion filterdefinition information illustrated in FIG. 9 or FIG. 10 not onlycontains the filter coefficients used in color-difference conversionfrom the first color-difference format into the second color-differenceformat, but also contains the filter coefficients that were used incolor-difference conversion from the second color-difference format intothe first color-difference format in the corresponding encoding device.

More particularly, in the color-difference conversion filter definitioninformation illustrated in FIG. 10, when the value ofchroma_filter_info, is “1”, the decoding unit 58A follows the syntaxillustrated in FIG. 11 and reads the value of target_format_idcrepresenting the second color-difference format, reads the value ofnum_of_filter_minus1 representing the value smaller by one than thecolor-difference conversion filter count, and reads the value offilter_coeff representing the filter coefficients.

Then, the decoding unit 58A outputs the read values to the convertingunit 60. The subsequent operations performed by the converting unit 60are identical to the operations described above.

In this way, even in the case when transmission information containingthe color-difference conversion information illustrated in FIG. 8 isreceived; in the decoding device 50, the filter identified by the filterinformation included in the color-difference conversion information isused to convert the color-difference format of a decoded image that isrepresented by the first color-difference format and that is obtained bydecoding the encoded data. As a result, the decoding device 50 becomesable to suppress the image deterioration occurring due to resolutionconversion.

Fifth Modification

Given below is the explanation of the operations performed by thedecoding unit 58 and the decoding unit 58A (see FIG. 25) in the casewhen the transmission information decoding unit 52 receives transmissioninformation containing the color-difference conversion informationillustrated in FIG. 12 from the encoding device 10.

In this case, the decoding unit 58A decodes the color-differenceconversion information according to the syntax illustrated in FIG. 12.

As described above, in the color-difference conversion informationillustrated in FIG. 12, chroma_loc_info_present_flag is a flag thatindicates whether or not the pixel position of a color-difference signalis present and indicates whether or not the filter info nation relatedto color-difference conversion is present. When the value ofchroma_loc_info_present_flag is “0”, the decoding unit 58A assumes thatneither the pixel position of a color-difference signal is present northe filter information related to color-difference conversion ispresent, and thus skips the value of chroma_loc_info_present_flag.

On the other hand, when the value of chroma_loc_info_present_flag is“1”, the pixel position of a color-difference signal is present as wellas the filter information related to color-difference conversion ispresent. Hence, in this case, the decoding unit 58A identifies the pixelsample position of the color difference according to the valuesindicated by chroma_sample_loc_type_top_field andchroma_sample_loc_type_bottom_field.

Moreover, chroma_filter_info_present_flag is a flag that indicateswhether or not the filter information related to color-differenceconversion is present. Thus, when the value ofchroma_filter_info_present_flag is “1”, the decoding unit 58A performsdecoding according to the syntax of the color-difference conversionfilter information illustrated in FIG. 13, FIG. 15, or FIG. 17.

The following explanation is given for a case when the decoding unit 58Aperforms decoding according to the syntax of the color-differenceconversion filter information illustrated in FIG. 13.

As described above, num_of_filter_set_minus1 represents the valuesmaller by one than the filter set count, and indicates that loopprocessing is performed for a number of times equal to the filter setcount. Moreover, implicit_filter_set_flag is a flag indicating that theinformation of a predefined filter set is used. Whenimplicit_filter_set_flag is set to “1”, the decoding unit 58A readsfilter_set_idc that represents the identification information which isused to identify the information of the predefined filter set. On theother hand, when implicit_filter_set_flag is set to “0”, the decodingunit 58A reads num_of_filter_minus1, which represents the value smallerby one than the color-difference conversion filter count, and implementsthe following loop of the color-difference conversion filter count.

As described above, implicit_filter_set_flag is a flag indicating thatthe information of a predefined filter set is used. Whenimplicit_filter_set_flag is set to “1”, the decoding unit 58A readsfilter_idc that represents the identification information which is usedto identify the predefined filter information. On the other hand, whenimplicit_filter_set_flag is set to “0”, the decoding unit 58A readstap_length_minus1 that represents the value smaller by one than the taplength of the filter coefficients. Then, the decoding unit 58A performslooping only for the tap length of the filter coefficients, and readsfilter_coeff that represents the filter coefficient value.

Then, corresponding to filter_set_idc and filter_idc, the decoding unit58A reads the following information of the predefined color-differenceconversion filter definition information: the tap length of the filtercoefficients (i.e., “tap length”); the filter coefficients (i.e.,“filter coefficient”); the denominator while performing filterprocessing (i.e., “divisor”); the sample position of thecolor-difference pixel after filter processing (i.e., “phase shift”);and the usage of the filter information and the information on thesecond color-difference format (i.e., “purpose”). Meanwhile, infilter_set_idc, it is also possible to define the filter coefficientsused in filter processing in the encoding device that corresponds tofilter processing in the decoding device.

Subsequently, the decoding unit 58A outputs the read values to theconverting unit 60. The subsequent operations performed by theconverting unit 60 are identical to the operations described above.

In this way, even in the case when transmission information containingthe color-difference conversion information illustrated in FIG. 12 isreceived; in the decoding device 50, the filter identified by the filterinformation included in the color-difference conversion information isused to convert the color-difference format of a decoded image that isrepresented by the first color-difference format and that is obtained bydecoding the encoded data. As a result, the decoding device 50 becomesable to suppress the image deterioration occurring due to resolutionconversion.

Sixth Modification

In the fifth modification, the explanation is given for a case in whichthe decoding unit 58A performs decoding according to the syntax of thecolor-difference conversion filter information illustrated in FIG. 14.

As described above, target_format_idc represents the secondcolor-difference format; while chroma_format_idc represents the firstcolor-difference format.

When the value of chroma_format_idc is equal to “1” and when the valueof target_format_idc is greater than “1”, or when the value ofchroma_format_idc is greater than “1” and when the value oftarget_format_idc is equal to “1”: the decoding unit 58A reads thefilter information in the vertical direction.

As described above, implicit_vertical_flag is a flag that indicates theuse of predefined filter information in the vertical direction. When thevalue of implicit_vertical_flag is set to “1”, the decoding unit 58Areads vertical_filter_idc that represents the identification informationwhich is used to identify the predefined filter information in thevertical direction. On the other hand, when the value ofimplicit_vertical_flag is set to “0”, the decoding unit 58A readstap_length_vertical_minus1, which represents the value smaller by onethan the tap length of the filter coefficients in the verticaldirection, and reads ver_filter_coeff, which represents the verticalfilter coefficients equivalent to the tap length.

Then, if the encoded data points to a field signal, the decoding unit58A reads second_filter_flag that is a flag defined for a case whendifferent filter sets in the vertical direction are used in the topfield and the bottom field. If the value of second_filter_flag is equalto “1”, the value of coded_format_idc is equal to “1”, and the value oftarget_format_idc is greater than “1”; then it indicates that the secondset of filter information is present.

If the value of implicit_vertical_flag is set to “1”, then the decodingunit 58A reads second_vertical_filter_idc representing theidentification information which is used to identify the second set ofpredefined filter information in the vertical direction. On the otherhand, if the value of implicit_vertical_flag is set to “0”, then thedecoding unit 58A reads tap_length_second_vertical_minus1, whichrepresents the value smaller by one than the tap length of the secondfilter coefficient set in the vertical direction, and readssecond_ver_filter_coeff, which represents the vertical filtercoefficients equivalent to the tap length.

Meanwhile, when the value of chroma_format_idc is equal to “1” or “2”and when the value of target_format_idc is equal to “3”, or when thevalue of chroma_format_idc is equal to “3” and when the value oftarget_format_idc is equal to “1” or “2”; the decoding unit 58A readsthe filter information in the horizontal direction.

Herein, implicit_horizontal_flag is a flag that indicates the use ofpredefined filter information in the horizontal direction. When thevalue of implicit_horizontal_flag is set to “1”, the decoding unit 58Areads horizontal_filter_idc that represents the identificationinformation which is used to identify the predefined filter informationin the horizontal direction. On the other hand, when the value ofimplicit_horizontal_flag is set to “0”, the decoding unit 58A readstap_length_horizontal_minus1, which represents the value smaller by onethan the tap length of the filter coefficients in the horizontaldirection, and reads hor_filter_coeff, which represents the horizontalfilter coefficients equivalent to the tap length.

Subsequently, the decoding unit 58A identifies filter_idc, which isillustrated in FIG. 16, corresponding to vertical_filter_idc,second_vertical_filter_idc, or horizontal_filter_idc illustrated in FIG.15. Then, corresponding to filter_idc that has been identified, thedecoding unit 58A reads the following information of the predefinedcolor-difference conversion filter definition information: the taplength of the filter coefficients (i.e., “tap length”); the filtercoefficients (i.e., “filter coefficient”); the denominator whileperforming filter processing (i.e., “divisor”); the sample position ofthe color-difference pixel after filter processing (i.e., “phaseshift”); and the usage of the filter information and the information onthe second color-difference format (i.e., “purpose”).

Subsequently, the decoding unit 58A outputs the read values to theconverting unit 60. The subsequent operations performed by theconverting unit 60 are identical to the operations described above.

In this way, even in the case in which decoding is performed accordingto the syntax of the color-difference conversion filter informationillustrated in FIG. 14; in the decoding device 50, the filter identifiedby the filter information included in the color-difference conversioninformation is used to convert the color-difference format of a decodedimage that is represented by the first color-difference format and thatis obtained by decoding the encoded data. As a result, the decodingdevice 50 becomes able to suppress the image deterioration occurring dueto resolution conversion.

Seventh Modification

In the fifth modification, the explanation is given for a case in whichthe decoding unit 58A performs decoding according to the syntax of thecolor-difference conversion filter information illustrated in FIG. 17.

When the value of chroma_format_idc is equal to “1” and when the valueof target_format_idc is greater than “1”, or when the value ofchroma_format_idc is greater than “1” and when the value oftarget_format_idc is equal to “1”, the decoding unit 58A reads thefilter information in the vertical direction.

More particularly, the decoding unit 58A readstap_length_vertical_minus1, which represents the value smaller by onethan the tap length of the filter coefficients in the verticaldirection, and reads ver_filter_coeff, which represents the verticalfilter coefficients equivalent to the tap length.

Then, if the encoded data points to a field signal, the decoding unit58A reads second_filter_flag that is a flag defined for a case whendifferent filter sets in the vertical direction are used in the topfield and the bottom field. If the value of second_filter_flag is equalto “1”, the value of coded_format_idc is equal to “1”, and the value oftarget_format_idc is greater than “1”; then it indicates that the secondset of filter information is present.

Hence, in this case, the decoding unit 58A readstap_length_second_vertical_minus1, which represents the value smaller byone than the tap length of the second filter coefficient set in thevertical direction, and reads second_ver_filter_coeff, which representsthe vertical filter coefficients equivalent to the tap length.

Meanwhile, when the value of chroma_format_idc is equal to “1” or “2”and when the value of target_format_idc is equal to “3”, or when thevalue of chroma_format_idc is equal to “3” and when the value oftarget_format_idc is equal to “1” or “2”; the decoding unit 58A readsthe filter information in the horizontal direction.

That is, the decoding unit 58A reads tap_length_horizontal_minus1, whichrepresents the value smaller by one than the tap length of the filtercoefficients in the horizontal direction, and reads hor_filter_coeff,which represents the horizontal filter coefficients equivalent to thetap length.

Then, the decoding unit 58A outputs the read values to the convertingunit 60. The subsequent operations performed by the converting unit 60are identical to the operations described above.

In this way, even in the case in which decoding is performed accordingto the syntax of the color-difference conversion filter informationillustrated in FIG. 17; in the decoding device 50, the filter identifiedby the filter information included in the color-difference conversioninformation is used to convert the color-difference format of a decodedimage that is represented by the first color-difference format and thatis obtained by decoding the encoded data. As a result, the decodingdevice 50 becomes able to suppress the image deterioration occurring dueto resolution conversion.

Eighth Modification

Given below is concrete explanation of a case in which the decodingdevice 50 receives transmission information that contains, as the filterinformation, the filter information used in filter processing performedby the converting unit 12 of the encoding device 10.

In this case, the decoding device 50 can be configured to include adecoding unit 5 in place of the decoding unit 58.

FIG. 29 is a schematic diagram illustrating the decoding unit 580.Herein, the decoding unit 580 includes a decoding unit 580A, a verticalfilter information generating unit 580B, and a horizontal filterinformation generating, unit 580C.

The decoding unit 580A analyzes the color-difference conversioninformation, and reads the first color-difference format, the secondcolor-difference format, and the filter information from thecolor-difference conversion information. In the eighth modification, thefilter information points to the filter information used in filterprocessing performed by the converting unit 12 of the encoding device10. Moreover, in the eighth modification, the vertical down-samplingfilter information and the horizontal down-sampling filter informationis also included in the filter information.

From the vertical down-sampling filter information included in thefilter information, the vertical filter information generating unit 580Bgenerates vertical up-sampling filter information to be used in filterprocessing in the converting unit 60 of the decoding device 50.Similarly, from the horizontal down-sampling filter information includedin the filter information, the horizontal filter information generatingunit 80C generates horizontal up-sampling filter information to be usedin filter processing in the converting unit 60 of the decoding device50. Then, to the converting unit 60, the decoding unit 580 outputs thevertical up-sampling filter information generated by the vertical filterinformation generating unit 580B, the horizontal up-sampling filterinformation generated by the horizontal filter information generatingunit 580B, and the color-difference conversion information containingthe first color-difference format, and the second color-differenceformat.

Then, in an identical manner to the third embodiment, the convertingunit 60 reads the first color-difference format, the secondcolor-difference format, and the filter information from thecolor-difference conversion information. Subsequently, the conveningunit 60 makes use of the filter identified by the filter information andconverts the resolution of the color-difference component of the decodedimage represented by the first color-difference format. With that, theconverting unit 60 converts the decoded image having the firstcolor-difference format into a decoded image having the secondcolor-difference format. Then, the converting unit 60 outputs thereproducible image, which is obtained by resolution conversion withrespect to the color-difference component of the decoded image, to areproducing device.

In this way, regarding the filter information used in filter processingperformed by the converting unit 60 of the decoding device 50, thefilter information can be generated in the decoding device 50.

Meanwhile, assume that the filter information that is included in thecolor-difference conversion information generated by the decoding unit58 or the decoding unit 580 contains vertical down-sampling filterinformation.

In such a case, the decoding device 50 is configured to include aconverting unit 600 in place of the converting unit 60.

FIG. 30 is a schematic diagram illustrating the converting unit 600.

The converting unit 600 includes a converting unit 600A and an outputadjusting unit 600B.

The converting unit 600A receives a decoded image having the 4:2:2format from the decoding unit 56. Then, the converting unit 600A makesuse of the vertical down-sampling filter information included in thefilter information that is included in the color-difference conversioninformation received from the decoding unit 58 or the decoding unit 580,and converts the decoded image having the 4:2:2 format into a decodedimage having the 4:2:0 format. That is, with respect to thecolor-difference component of each pixel constituting the decoded imagehaving the 4:2:2 format, the converting unit 600A performs down-samplingfor the purpose of decimating the color-difference component to half inthe vertical direction. Then, the converting unit 600A outputs thedecoded image having the 4:2:0 format to the output adjusting unit 600B.

The output adjusting unit 600B either reads, from the color-differenceconversion information, the pixel bit length at the time of output, themaximum value of the color-difference component at the time of output,and the minimum value of the color-difference component at the time ofoutput; or performs a clipping operation with respect to the decodedimage in such a way that the pixel bit length, the maximum value, andthe minimum value according to the specifications of a predeterminedcolor-difference format are satisfied. Then, the output adjusting unit600B outputs the post-clipping decoded image as the reproducible imageto be reproduced.

Fourth Embodiment

Given below is the explanation about a hardware configuration of theencoding device 10, the encoding device 10A, the encoding device 10B,and the decoding device 50. FIG. 31 is a block diagram illustrating ahardware configuration of the encoding device 10, the encoding device10A, the encoding device 10B, and the decoding device 50.

Each of the encoding device 10, the encoding device 10A, the encodingdevice 10B, and the decoding device 50 according to the embodiments hasthe hardware configuration of a commonly-used computer in which acommunication interface (I/F) 86, a central processing unit (CPU) 80, aread only memory (ROM) 82, and a random access memory (RAM) 84 areconnected to each other by a bus.

The CPU 80 is a processor that controls the overall operations performedin the encoding device 10, the encoding device 10A, the encoding device10B, or the decoding device 50. The RAM 84 is used to store the datarequired for various operations performed by the corresponding CPU 80.The ROM 82 is used to store computer programs used in implementingvarious operations performed by the corresponding CPU 80. Thecommunication I/F 86 is an interface that establishes connection with anexternal device via a communication line, and sends data to and receivesdata from that external device.

Meanwhile, a computer program executed in the encoding device 10, theencoding device 10A, and the encoding device 10B for performing theencoding operation as well as a computer program executed in thedecoding device 50 for performing the decoding operation is stored inadvance in the ROM 82.

Alternatively, the computer program executed in the encoding device 10,the encoding device 10A, and the encoding device 10B for performing theencoding operation as well as a computer program executed in thedecoding, device 50 for performing the decoding operation may berecorded in the form of an installable file or an executable file in acomputer-readable storage medium such as a compact disk read only memory(CD-ROM), a flexible disk (FD), a compact disk readable (CD-R), or adigital versatile disk (DVD); and can be provided as a computer programproduct.

Still alternatively, the computer program executed in the encodingdevice 10, the encoding device 10A, and the encoding device 10B forperforming the encoding operation as well as a computer program executedin the decoding device 50 for performing the decoding operation may besaved as a downloadable file on a computer connected to the Internet orcan be made available for distribution through a network such as theInternet.

Meanwhile, the computer program executed in the encoding device 10, theencoding device 10A, and the encoding device 10B for performing theencoding operation as well as a computer program executed in thedecoding device 50 for performing the decoding operation contains amodule for each of the respective constituent elements to be implementedin a computer. In practice, for example, the CPU 80 reads the computerprograms from the corresponding ROM 82 and runs them such that thecomputer programs are loaded in a main memory device. As a result, themodule for each constituent element is generated in the main memorydevice.

While certain embodiments have been described, these embodiments havebeen presented by way of example only, and are not intended to limit thescope of the inventions. Indeed, the novel embodiments described hereinmay be embodied in a variety of other forms furthermore, variousomissions, substitutions and changes in the form of the embodimentsdescribed herein may be made without departing from the spirit of theinventions. The accompanying claims and their equivalents are intendedto cover such forms or modifications as would fall within the scope andspirit of the inventions.

What is claimed is:
 1. A decoding device comprising: a receiver toacquire transmission information including encoded data, firstcolor-difference format, a second color-difference format, and filteridentifying information, the first color-difference format indicating aresolution of a color-difference component of the encoded data that isgenerated according to predetermined syntax, the second color-differenceformat indicating a resolution of a color-difference component used whenreproducing a decoded image obtained by decoding the encoded data, thefilter identifying information being for identifying a filter that isused in converting a color-difference format of the decoded image; adecoder to decode the encoded data included in the transmissioninformation to obtain the decoded image; and a converter to convert acolor-difference format of the decoded image using the filter identifiedwith the filter identifying information, wherein the firstcolor-difference format is indicative of a resolution of acolor-difference component of a 4:2:2 format or a 4:4:4 format, and thesecond color-difference format is indicative of a resolution of acolor-difference component of a 4:2:0 format; or the firstcolor-difference format is indicative of the resolution of thecolor-difference component of the 4:4:4 format, and the secondcolor-difference format is indicative of the resolution of thecolor-difference component of the 4:2:0 format or the 4:2:2 format; thefilter identifying information includes a filter coefficient; and theconverter converts the color-difference format of the decoded image byusing at least one of a horizontal down-sampling filter and a verticaldown-sampling filter in accordance with the filter coefficient.
 2. Adecoding device comprising: a receiver to acquire transmissioninformation including encoded data, a first color-difference format, asecond color-difference format, and filter information, the firstcolor-difference format indicating a resolution of a color-differencecomponent of the encoded data that is generated according topredetermined syntax, the second color-difference format indicating aresolution of a color-difference component used when reproducing adecoded image obtained by decoding the encoded data, the filterinformation being for identifying a filter that is used in converting acolor-difference format of the decoded image; a decoder to decode theencoded data included in the transmission information to obtain thedecoded image; and a converter to convert a color-difference format ofthe decoded image using the filter identified with the filterinformation, wherein the first color-difference format is indicative ofa resolution of a color-difference component of a 4:2:2 format or a4:4:4 format, and the second color-difference format is indicative of aresolution of a color-difference component of a 4:2:0 format; or thefirst color-difference format is indicative of the resolution of thecolor-difference component of the 4:4:4 format, and the secondcolor-difference format is indicative of the resolution of thecolor-difference component of the 4:2:0 format or the 4:2:2 format; thefilter information includes identification information of the filter;and the converter converts the color-difference format of the decodedimage by using at least one of a horizontal down-sampling filter and avertical down-sampling filter in accordance with the identificationinformation of the filter.
 3. An encoding device comprising: an encoderto generate encoded data; a generator to generate a firstcolor-difference format, a second color-difference format, and filterinformation, the first color-difference format indicating a resolutionof a color-difference component of the encoded data that is generatedaccording to predetermined syntax, the second color-difference formatindicating a resolution of a color-difference component used whenreproducing a decoded image obtained by decoding the encoded data, thefilter information being for identifying a filter that is used inconverting a color-difference format of the decoded image; and anoutputter to output transmission information including the encoded data,the first color-difference format, the second color-difference format,and the filter information, wherein the filter information includes afilter coefficient or identification information of the filter; and thefilter used in converting the color-difference format includes at leastone of a horizontal down-sampling filter and a vertical down-samplingfilter.